#include<iostream>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int a = 0;
    while(n)
    {
        a = a * 10 + n % 10;
        n /= 10;
    }
    cout << a << endl;
    return 0;
}